package com.example.web.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 权限注解
 */
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface RequiresPermission {
    
    /**
     * 权限字符串
     */
    String value();
    
    /**
     * 逻辑类型：AND | OR，默认AND
     */
    Logical logical() default Logical.AND;
    
    /**
     * 逻辑枚举
     */
    public enum Logical {
        AND,
        OR
    }
}